package aod.android.com.bernay.mine.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import aod.android.com.bernay.R;
import aod.android.com.bernay.base.BernayBaseActivity;
import aod.android.com.bernay.loginandregister.RegisterAndForgetPwdActivity;
import chen.lion.hilib.view.bind.HiView;

/**
 * @author crated by zhixianuanyang on 2019/4/18 15:31
 * @Email jamesKing0812@gmail.com
 */
public class AccountManagerActivity extends BernayBaseActivity implements View.OnClickListener {

    @HiView(R.id.rl_new_register)
    RelativeLayout mNewRegister;

    @HiView(R.id.rl_register)
    RelativeLayout mRegister;

    @HiView(R.id.rl_foundPassword)
    RelativeLayout mFoundPassword;

    private Bundle extras;

    private String title;

    @Override
    protected int initLayout() {
        return R.layout.activity_account_manager;
    }

    @Override
    protected void initData() {
        extras = getIntent().getExtras();
        title = extras.getString("title");
        initTitle(title);
        mNewRegister.setOnClickListener(this);
        mRegister.setOnClickListener(this);
        mFoundPassword.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Bundle bundle = new Bundle();
        switch (v.getId()){
            case R.id.rl_new_register:
                bundle.putString("register", "1");//1为注册 2为忘记密码
                goActivity(RegisterAndForgetPwdActivity.class, bundle);
                break;
            case R.id.rl_register:
                bundle.putString("register", "1");//1为注册 2为忘记密码
                goActivity(RegisterAndForgetPwdActivity.class, bundle);
                break;
            case R.id.rl_foundPassword:
                bundle.putString("register", "2");//1为注册 2为忘记密码
                goActivity(RegisterAndForgetPwdActivity.class, bundle);
                break;
            default:
                break;
        }
    }
}
